using System;
using System.Collections.Generic;
using Castle.ActiveRecord;
using CosyTrade.Data;

namespace CosyTrade.StoreManagement
{
    [AddPropertyChangedNotifyInterface, PropertyChangedNotify]
    [Serializable, ActiveRecord("exportBill")]
    public class ExportBill : ExportBillBase
    {
        private readonly IList<ExportBillItem> billItems = new List<ExportBillItem>();

        [HasMany(typeof(ExportBillItem), "billGuid", "exportBillItems", Access=PropertyAccess.NosetterCamelcase, Where="IsDeleteObject=0")]
        public IList<ExportBillItem> BillItems
        {
            get { return billItems; }
        }
    }

    [Serializable]
    public enum BillState
    {
        IsNew = 0x01,
        IsUpdate = 0x02,
        IsDelete = 0x03
    }
}